# experiment_1_hello_world.py
import pybullet as p
import pybullet_data
import time


physicsClient = p.connect(p.GUI)  # 尝试改成 p.DIRECT 看看效果
p.setGravity(0,0,-9.8)

p.loadURDF("./tests/urdf/cube.urdf",[0,0,0.5])
# robot_id = p.loadURDF("./tests/urdf/revolute_joint.urdf", [0, 0, 0.05])
p.setAdditionalSearchPath(pybullet_data.getDataPath())
p.loadURDF("plane.urdf")
#仿真运行
for i in range(50000):
    p.stepSimulation()
    
    time.sleep(1/100)
    
# 2. 断开连接，关闭仿真
p.disconnect()

print("仿真世界已关闭")